Skip to content

fix: cancel image loading when not visible #9625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

aonnikov
Copy link
Member

No description provided.

@aonnikov aonnikov marked this pull request as draft July 31, 2025 10:11
Copy link

Connected to Huly®: UBERF-12914

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements functionality to cancel image loading when images are not visible, optimizing performance by preventing unnecessary network requests for off-screen images. The changes introduce a continuous visibility tracking mode to the lazy loading system and apply it to image components.

  • Adds continuous observation mode to the lazy loading utility to track when elements become visible/invisible
  • Implements visibility-based image loading that cancels requests when images go out of view
  • Updates configuration to use new image service endpoints

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/ui/src/lazy.ts Adds continuous observation mode and convenience functions for different lazy loading behaviors
packages/presentation/src/components/Image.svelte Implements visibility tracking to conditionally load images based on viewport presence
dev/prod/public/config-dev.json Updates configuration with new image and file service URLs

Signed-off-by: Alexander Onnikov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant